#ifndef DIALOGDEVICE_H
#define DIALOGDEVICE_H

#include <QDialog>
#include "json_list.h"

namespace Ui {
class DialogDevice;
}

class DialogDevice : public QDialog
{
    Q_OBJECT

public:
    explicit DialogDevice(QWidget *parent = nullptr);
    ~DialogDevice();

private slots:
    void on_pushButton_Add_clicked();

    void on_pushButton_Del_clicked();

    void on_pushButton_Next_clicked();

    void on_pushButton_Prov_clicked();

    void on_lineEdit_Model_textChanged(const QString &arg1);

    void on_checkBox_Lock_clicked();

private:
    void fflush_node(const struct device_node* const _node);
    void create_list_empty(const char* path);
    void read_list_item(const int _index, const struct device_node* const node);

private:
    Ui::DialogDevice *ui;
    int item_sum;
    int item_index;
};

#endif // DIALOGDEVICE_H
